package iloc.cc.tablelayoutdemo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class BranchListFragment extends Fragment {

	private String categoryId;
	private String title;

	public static BranchListFragment newInstance(String categoryId, String title) {
		Bundle args = new Bundle();
		BranchListFragment fragment = new BranchListFragment();
		args.putString("1", categoryId);
		args.putString("2", title);
		fragment.setArguments(args);
		return fragment;
	}


	@Nullable
	@Override
	public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		TextView textView = new TextView(getContext());
		Bundle a = getArguments();
		categoryId = (String) a.get("1");
		title = (String) a.get("2");
		textView.setText(categoryId + ":" + title);
		return textView;
	}
}
